package DP.P1002;/*
 *   exercise
 *   DP.P1002
 *
 *   description:
 *   @data 2025/4/26     下午3:52
 *   @author 凉风
 */

import java.util.Scanner;

public class Main {
    static Scanner scanner = new Scanner(System.in);
    static int m = scanner.nextInt();//B点的横坐标
    static int n = scanner.nextInt();//B点的纵坐标
    static int x = scanner.nextInt();//马的横坐标
    static int y = scanner.nextInt();//马的纵坐标
    static int[] dx = {-2, -1, 1, 2, 2, 1, -1, -2};
    static int[] dy = {1, 2, 2, 1, -1, -2, -2, -1};
    public static void main(String[] args) {
        boolean[][] control = new boolean[m + 1][n + 1];
        control[x][y] = true;
        for (int i = 0; i < 8; i++) {
            int nx = x + dx[i];
            int ny = y + dy[i];
            if (nx >= 0 && nx <= m && ny >= 0 && ny <= n) {
                control[nx][ny] = true;
            }
        }

        long[][] dp = new long[m + 1][n + 1];
        dp[0][0] = control[0][0] ? 0 : 1;

        for (int i = 1; i <= n; i++) {
            if (!control[i][0]) {
                dp[i][0] = dp[i - 1][0];
            }
            else {
                dp[i][0] = 0;
            }
        }
        for (int j = 1; j <= m; j++) {
            if (!control[0][j]) {
                dp[0][j] = dp[0][j - 1];
            }
            else {
                dp[0][j] = 0;
            }
        }
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= m; j++) {
                if (!control[i][j]) {
                    dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
                }
                else {
                    dp[i][j] = 0;
                }
            }
        }
        System.out.println(dp[n][m]);
    }
}
